package com.bleeth.fx;

import com.bleeth.hvbox.LoginTest;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.SnapshotParameters;
import javafx.scene.effect.BoxBlur;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

// slides a frost pane in on scroll or swipe up; slides it out on scroll or swipe down.
public class Frosty_1 extends Application {

    private static final double W = 400;
    private static final double H = 400;

    private static final double BLUR_AMOUNT = 60;


    @Override public void start(Stage stage) {
        ImageView background = new ImageView(new Image("img/bg_8.jpg"));

        Image frostImage = background.snapshot(new SnapshotParameters(), null);
        ImageView frost = new ImageView(frostImage);
        Pane frostPane = new Pane(frost);
        frostPane.setEffect(new BoxBlur(BLUR_AMOUNT, BLUR_AMOUNT, 10));
        StackPane frostView = new StackPane(frostPane);

        Scene scene = new Scene(new StackPane(frostView, LoginTest.show(stage)));
        stage.setScene(scene);
        stage.show();

    }

    public static void main(String[] args) { launch(args); }
}  